/*
 * Copyright(c) 2018-? the original author[Wien(luweien@aliyun.com)] or authors.
 *
 */
package org.doll.it.web.filter;

import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebFilter;

import org.springframework.core.annotation.Order;

import lombok.extern.slf4j.Slf4j;

/**
 * Doll Web过滤器
 * 
 * @author Wien(luweien@aliyun.com)
 *
 */
@Slf4j
@Order(1)
@WebFilter(filterName = "dollWebFilter", urlPatterns = "/*")
public class DollWebFilter implements Filter {

	@Override
	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
			throws IOException, ServletException {
		log.debug("---dollWebFilter-");
		//	HttpServletRequest req = (HttpServletRequest) request;
		//	HttpServletResponse res = (HttpServletResponse) response;
		chain.doFilter(request, response);
	}

	@Override
	public void init(FilterConfig filterConfig) throws ServletException {
	}

	@Override
	public void destroy() {
		// 清理
	}
}
